package com.farben.system.domain;

import com.farben.common.annotation.Excel;
import com.farben.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 后管应用信息对象 aging_design_user_app_link
 *
 * @author zcc
 * @date 2023-05-26
 */

@EqualsAndHashCode(callSuper = true)
@Data
@With
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AgingDesignUserAppLink extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long id;

    /**
     * 应用id
     */
    private String appId;

    /**
     * 用户Id
     */
    private String userId;

    /**
     * 修改者
     */
    @Excel(name = "修改者")
    private String updateBy;

    /**
     * 创建者
     */
    @Excel(name = "创建者")
    private String createdBy;

    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updateDate;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdDate;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("appId", getAppId())
                .append("createdBy", getCreatedBy())
                .append("createdDate", getCreatedDate())
                .toString();
    }
}
